package com.xyx.bloodoxygenjava.devices;

import android.util.Log;

import com.xyx.bloodoxygenjava.utils.ACSUtility;
import com.xyx.bloodoxygenjava.utils.IBLECallBack;

import java.util.List;


public class DeviceListener implements IBLECallBack {

    private static String TAG = "DeviceListener";

    @Override
    public void onFindDevice(ACSUtility.blePort blePort) {
        Log.i(TAG, "onFindDevice: " + blePort._device.getAddress());
    }

    @Override
    public void onDiscoveryCompleted(List<ACSUtility.blePort> list) {
        Log.i(TAG, "onDiscoveryCompleted: 设备数量 :: " + list.size());
        for (ACSUtility.blePort port : list){
            Log.i(TAG, "onDiscoveryCompleted: " + port._device.getAddress() + ", name : " + port._device.getName());
        }
    }

    @Override
    public void onConnected(ACSUtility.blePort blePort) {
        Log.i(TAG, "onConnected: " + blePort._device.getAddress());
    }

    @Override
    public void onConnectFail() {

    }

    @Override
    public void onSended(boolean b) {

    }

    @Override
    public void onDisConnect(ACSUtility.blePort blePort) {
        Log.i(TAG, "onDisConnect: " + blePort._device.getAddress());
    }

    @Override
    public void onReadyForUse() {
        Log.i(TAG, "onReadyForUse: ");
    }
}
